﻿using System;
using DapperLambdaSQL.BuildSQL;
using DapperLambdaSQL.BuildSQL.Impl;
using DapperLambdaSQL.Factory.Impl;

namespace DapperLambdaSQL.Factory
{
    public class SQLBuilderFactory
    {
        public static ISQLBuilder CreateSQLBuilder(IDbConnectionFactory dbConnection)
        {
            return dbConnection switch
            {
                MySqlConnectionFactory mySql => new MySQLSQLBuilder(mySql.SQLOptions),
                _ => throw new Exception(),
            };
        }
    }
}